Instance Methods

The following instance methods are available globally.

  • Expand GlidingCollection

    Declaration

    Swift

    public func expand(at index: Int, animated: Bool = default)

    Parameters

    index

    target index

    animated

    animate changes

  • Must call super if you override this method.

    Declaration

    Swift

    public func scrollViewDidScroll(_ scrollView: UIScrollView)
  • Expand next item in list

    Declaration

    Swift

    public func expandNext()
  • Expand previous item in list

    Declaration

    Swift

    public func expandPrevious()
  • Number of items in vertical stack of items.

    Declaration

    Swift

    func numberOfItems(in collection: GlidingCollection) -> Int

    Parameters

    collection

    GlidingCollection

    Return Value

    number of items in stack

  • Item at given index.

    Declaration

    Swift

    func glidingCollection(_ collection: GlidingCollection, itemAtIndex index: Int) -> String

    Parameters

    collection

    GlidingCollection

    index

    index of item

    Return Value

    item title

  • This method will be called if selected one of the element of vertical stack.

    Declaration

    Swift

    func glidingCollection(_ collection: GlidingCollection, didSelectItemAt index: Int)

    Parameters

    collection

    GlidingCollection

    index

    Index of selected item.

  • This method will be called when transition between items was finished.

    Declaration

    Swift

    func glidingCollection(_ collection: GlidingCollection, didExpandItemAt index: Int)

    Parameters

    collection

    GlidingCollection

    index

    Index of expanded item.

  • This method will be called before starting transition from one item to another.

    Declaration

    Swift

    func glidingCollection(_ collection: GlidingCollection, willExpandItemAt index: Int)

    Parameters

    collection

    GlidingCollection

    index

    Index of item that being expand.